export default {
  data() {
    return {
      //设置默认的分享参数
      share: {
        title: 'MetaSports',
        path: '/pages/index/index',
        imageUrl: 'http://mic.cestc-yd.cn/metasports/home_pic_bg_top%403x.png',
        desc: '',
        content: ''
      }
    }
  },
  onShareAppMessage(res) {
    console.log("分享参数： ", res)
    return {
      title: this.share.title,
      path: this.share.path,
      imageUrl: this.share.imageUrl,
      desc: this.share.desc,
      content: this.share.content,
      success(res) {
        uni.showToast({
          title: '分享成功'
        })
      },
      fail(res) {
        uni.showToast({
          title: '分享失败',
          icon: 'none'
        })
      }
    }
  },
  onShareTimeline(res) {
    return {
      title: this.share.title
    }
  },
}
